
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Bokeh Plot</title>
        
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css" type="text/css" />
        
<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.js"></script>
<script type="text/javascript">
    Bokeh.set_log_level("info");
</script>
    </head>
    <body>
        
        <div class="plotdiv" id="ed497977-5d80-4d5a-8cc7-330a84119363"></div>
        
        <script type="text/javascript">
            Bokeh.$(function() {
            var docs_json = {"7938766a-212a-4fd1-a7ad-b0f1808b07c1":{"roots":{"references":[{"attributes":{"dimension":1,"plot":{"id":"9ad6b319-183e-4ef5-b660-b9f54183eec6","subtype":"Figure","type":"Plot"},"ticker":{"id":"1e07e391-25f6-46f6-9c86-125c412020fc","type":"BasicTicker"}},"id":"a09dacfb-ec81-4610-943f-873692d315ed","type":"Grid"},{"attributes":{"callback":null},"id":"91ea34f3-cc09-4d7b-9d3d-b764951cdd08","type":"Range1d"},{"attributes":{"data_source":{"id":"b9016226-eef2-41c4-9bcf-e488974f183b","type":"ColumnDataSource"},"glyph":{"id":"89f4f8ee-e133-4dec-9e4e-5855eac7c662","type":"Rect"},"hover_glyph":null,"nonselection_glyph":{"id":"89f4f8ee-e133-4dec-9e4e-5855eac7c662","type":"Rect"},"selection_glyph":{"id":"89f4f8ee-e133-4dec-9e4e-5855eac7c662","type":"Rect"}},"id":"6177b512-cb90-476a-87ca-cb275dc1f087","type":"GlyphRenderer"},{"attributes":{},"id":"1ecc8cff-2c90-402e-8d3b-589a4feba0ae","type":"BasicTickFormatter"},{"attributes":{"formatter":{"id":"9d568446-aa9d-4b1a-9649-205f52583665","type":"BasicTickFormatter"},"plot":{"id":"9ad6b319-183e-4ef5-b660-b9f54183eec6","subtype":"Figure","type":"Plot"},"ticker":{"id":"e7e46068-41b5-4b86-bd06-4c251c1b6145","type":"BasicTicker"}},"id":"65db11d4-a21f-4bf1-a57e-dc4dfd7c631e","type":"LinearAxis"},{"attributes":{"callback":{"id":"09cf2064-9c0e-492f-b33e-db0c98dcced5","type":"CustomJS"},"overlay":{"id":"cbce1671-49ce-42e7-b83b-ff8733d53618","type":"BoxAnnotation"},"plot":{"id":"9ad6b319-183e-4ef5-b660-b9f54183eec6","subtype":"Figure","type":"Plot"}},"id":"5a2497f5-5f66-4afe-b3ee-475e1526440f","type":"BoxSelectTool"},{"attributes":{"plot":{"id":"9ad6b319-183e-4ef5-b660-b9f54183eec6","subtype":"Figure","type":"Plot"},"ticker":{"id":"e7e46068-41b5-4b86-bd06-4c251c1b6145","type":"BasicTicker"}},"id":"c9b10634-5945-40b5-a3c1-449c2f3860a3","type":"Grid"},{"attributes":{"below":[{"id":"65db11d4-a21f-4bf1-a57e-dc4dfd7c631e","type":"LinearAxis"}],"left":[{"id":"204debba-c785-4c7c-ba82-e83f7ba63ec6","type":"LinearAxis"}],"plot_height":400,"plot_width":400,"renderers":[{"id":"65db11d4-a21f-4bf1-a57e-dc4dfd7c631e","type":"LinearAxis"},{"id":"c9b10634-5945-40b5-a3c1-449c2f3860a3","type":"Grid"},{"id":"204debba-c785-4c7c-ba82-e83f7ba63ec6","type":"LinearAxis"},{"id":"a09dacfb-ec81-4610-943f-873692d315ed","type":"Grid"},{"id":"cbce1671-49ce-42e7-b83b-ff8733d53618","type":"BoxAnnotation"},{"id":"6177b512-cb90-476a-87ca-cb275dc1f087","type":"GlyphRenderer"}],"title":"Select Below","tool_events":{"id":"b572dc9c-7d13-4322-8216-1eb6be63ac6e","type":"ToolEvents"},"tools":[{"id":"5a2497f5-5f66-4afe-b3ee-475e1526440f","type":"BoxSelectTool"}],"x_range":{"id":"91ea34f3-cc09-4d7b-9d3d-b764951cdd08","type":"Range1d"},"y_range":{"id":"8e20fbc6-98ff-42d2-99ba-ea4541a631b9","type":"Range1d"}},"id":"9ad6b319-183e-4ef5-b660-b9f54183eec6","subtype":"Figure","type":"Plot"},{"attributes":{"callback":null},"id":"8e20fbc6-98ff-42d2-99ba-ea4541a631b9","type":"Range1d"},{"attributes":{"callback":null,"column_names":["y","width","height","x"],"data":{"height":[],"width":[],"x":[],"y":[]}},"id":"b9016226-eef2-41c4-9bcf-e488974f183b","type":"ColumnDataSource"},{"attributes":{},"id":"b572dc9c-7d13-4322-8216-1eb6be63ac6e","type":"ToolEvents"},{"attributes":{},"id":"e7e46068-41b5-4b86-bd06-4c251c1b6145","type":"BasicTicker"},{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"black"},"line_dash":[4,4],"line_width":{"value":2},"plot":null,"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"cbce1671-49ce-42e7-b83b-ff8733d53618","type":"BoxAnnotation"},{"attributes":{"fill_alpha":{"value":0.3},"fill_color":{"value":"#009933"},"height":{"field":"height","units":"data"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"89f4f8ee-e133-4dec-9e4e-5855eac7c662","type":"Rect"},{"attributes":{"formatter":{"id":"1ecc8cff-2c90-402e-8d3b-589a4feba0ae","type":"BasicTickFormatter"},"plot":{"id":"9ad6b319-183e-4ef5-b660-b9f54183eec6","subtype":"Figure","type":"Plot"},"ticker":{"id":"1e07e391-25f6-46f6-9c86-125c412020fc","type":"BasicTicker"}},"id":"204debba-c785-4c7c-ba82-e83f7ba63ec6","type":"LinearAxis"},{"attributes":{},"id":"1e07e391-25f6-46f6-9c86-125c412020fc","type":"BasicTicker"},{"attributes":{},"id":"9d568446-aa9d-4b1a-9649-205f52583665","type":"BasicTickFormatter"},{"attributes":{"args":{"source":{"id":"b9016226-eef2-41c4-9bcf-e488974f183b","type":"ColumnDataSource"}},"code":"\n        // get data source from Callback args\n        var data = source.get('data');\n\n        /// get BoxSelectTool dimensions from cb_data parameter of Callback\n        var geometry = cb_data['geometry'];\n\n        /// calculate Rect attributes\n        var width = geometry['x1'] - geometry['x0'];\n        var height = geometry['y1'] - geometry['y0'];\n        var x = geometry['x0'] + width/2;\n        var y = geometry['y0'] + height/2;\n\n        /// update data source with new Rect attributes\n        data['x'].push(x);\n        data['y'].push(y);\n        data['width'].push(width);\n        data['height'].push(height);\n\n        // trigger update of data source\n        source.trigger('change');\n    "},"id":"09cf2064-9c0e-492f-b33e-db0c98dcced5","type":"CustomJS"}],"root_ids":["9ad6b319-183e-4ef5-b660-b9f54183eec6"]},"title":"Bokeh Application","version":"0.11.1"}};
            var render_items = [{"docid":"7938766a-212a-4fd1-a7ad-b0f1808b07c1","elementid":"ed497977-5d80-4d5a-8cc7-330a84119363","modelid":"9ad6b319-183e-4ef5-b660-b9f54183eec6"}];
            
            Bokeh.embed.embed_items(docs_json, render_items);
        });
        </script>
    </body>
</html>